package com.gmzg.gmzgnews.news.entries;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Jasen on 2016 2016/11/1.19:57
 * Email:1142803753@qq.com
 * weixin: aserbao
 */

public class HeadTop {

    /**
     * list : []
     * page : 1
     * size : 10
     * status : true
     * total : 3169
     * totalpage : 317
     */

    private int page;
    private int size;
    private boolean status;
    private int total;
    private int totalpage;
    private List<HeadNews> list;

    public static List<HeadTop> arrayTopFromData(String str) {

        Type listType = new TypeToken<ArrayList<HeadTop>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getTotalpage() {
        return totalpage;
    }

    public void setTotalpage(int totalpage) {
        this.totalpage = totalpage;
    }

    public List<HeadNews> getList() {
        return list;
    }

    public void setList(List<HeadNews> list) {
        this.list = list;
    }
}
